package com.groupbuying.sysconfig.controller;

import java.math.BigInteger;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import com.groupbuying.sysconfig.domain.SysconfigDeployDO;
import com.groupbuying.sysconfig.service.SysconfigDeployService;
import com.groupbuying.sysconfig.utils.PageUtils;
import com.groupbuying.sysconfig.utils.Query;
import com.groupbuying.sysconfig.utils.R;

/**
 * 当前系统配置表
 * 
 * @author zmlmagic
 * @email zmlmagic@163.com
 * @date 2019-05-09 08:50:48
 */
 
@RestController
@RequestMapping("/config")
public class SysconfigDeployController {
	@Autowired
	private SysconfigDeployService sysconfigDeployService;

	/**
	 * feign调用
	* */
	@GetMapping("/getPayChannel")
	public String getPayChannel(){
		return sysconfigDeployService.getPayChannel();
	}


	/**
	 * 获取分成比例,废弃
	 * */
	@Deprecated
	@GetMapping("/getSettleScale")
	public Map getSettleScale(){
		Map resultMap = new HashMap();
		resultMap.put("paySettle",sysconfigDeployService.getYDOnlinePaySettle());
		resultMap.put("curSettle",sysconfigDeployService.getYDCurPaySettle());
		return resultMap;
	}

	/**
	 * 够样优惠买单-获取平台分成比例
	 * */
	@GetMapping("/getGYSettleScale")
	public Map getGYSettleScale(){
		Map resultMap = new HashMap();
		resultMap.put("paySettle",sysconfigDeployService.getGYCurPaySettle());
		return resultMap;
	}

	/**
	 * 获取线上结算打款渠道
	 * YINSHENG - 银盛
	 * NATIVE - 原生线下
	 * */
	@GetMapping("/getCashChannel")
	public String getCashChannel(){
		return sysconfigDeployService.getYDCashChannel();
	}


	/**
	 * 够样优店-银盛支付-提现手续费
	 * yd_ys_fee_cash - key
	 * */
	@GetMapping("/getFeeCash")
	public String getFeeCash(){
		return sysconfigDeployService.getYDFeeCash();
	}


	/**
	 * 获取够样优店-银盛支付-代付手续费
	 * yd_ys_fee_replace - key
	 * */
	@GetMapping("/getFeeReplace")
	public String getFeeReplace(){
		return sysconfigDeployService.getYDFeeReplace();
	}
}
